<?php
header('content-type:text/html;charset=utf-8');
// 身份验证
session_start();
if(!isset($_SESSION['login'])){
	header('Refresh:2;url=login/index.php');
	echo '用户还没登录!';
	die();
}
// 接收数据
$id=isset($_GET['id'])?$_GET['id']:0;

// 组织删除
// 引入数据库
include_once('dbtools.inc.php');
include_once('config.php');
$link=create_connection();
$sql="delete from carts where orderid={$id}";
$res=execute_sql($link,'school',$sql);
// header('Refresh:1;url=index.php');
// echo '移除成功！';
echo ('<script type="text/javascript">alert("移除成功！");
     			window.history.back(-1);
     			</script>');
	die();


?>